<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <style>
    *{
        box-sizing: border-box;
    }
    html,body{
        height: 100%;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }
        /* 隐藏开关 */
        .toggle-switch {
        display: none;
        }

        /* 触发按钮样式 */
        .toggle-button {
        padding: 8px 16px;
        background: #007bff;
        color: white;
        cursor: pointer;
        }

        /* 初始隐藏目标内容 */
        .target-content {
        display: none;
        margin-top: 10px;
        padding: 10px;
        border: 1px solid #ccc;
        }

        /* 点击后显示目标内容 */
        .toggle-switch:checked + .toggle-button + .target-content {
        display: block;
        }
    </style>
    <title>Document</title>
</head>
<body>
    <!-- 开关（隐藏） -->
    <input type="checkboxa" class="toggle-switch" id="toggle">
    <!-- 触发按钮（触发开关） -->
    <label for="toggle" class="toggle-button">点击</label>
    <!-- 内容 -->
     <div class="toggle-content">内容</div>
</body>
</html>